<template>
	<view class="zc" >
		<text>方针政策</text>
		<text style="padding: 20upx; font-size: 26upx;float: right;margin-right: 30upx;line-height: 10upx;" @click="toZhengCe">更多 ></text>
		<view class="zc_t uni-flex" v-for="(item,index) in zhengce" :key="index" @click="tz(item.policyId)">
			<view class="zc_z">
				<image src="../../static/banner/zc.png" mode="widthFix"></image>
			</view>
			<view class="zc_r">
				<view class="zc_r_t slh2">{{item.name}}</view>
				<!-- <rich-text class="zc_r_b" :nodes="item.content"></rich-text> -->
			</view>
		</view>
		<view style="height: 50upx;"></view>
	</view>
</template>

<script>
	export default{
		data() {
			return {
				show:false,
				title: 'Hello',
				zhengce:[]
			}
			
		},
		onLoad() {
		
		},
		created() {
			console.log('123123===123123')
			let that = this
			let params = {
				"pageNo":1,
				"pageSize":3,
				"typeId":1
			}
			let baseUrl = uni.getStorageSync('baseUrl');
			if(!baseUrl){
				
			}else{
				that.pyReq(that.$http.getPolicy,params,function(res){
						  that.zhengce = res.result
				});
			}
			
			// uni.request({
			// 	  url: that.$http.getPolicy,
			// 	  method: 'POST',
			// 	  data:params,
			// 	  header:headers,
			// 	  success: (res)=>{
			// 		  console.log(res)
			// 		  if(res.data.code == '1001'){
			// 			  uni.clearStorageSync();
			// 			  uni.reLaunch({
			// 				url:'/pages/index/logo/logo'
			// 			  })
			// 		  }else{
			// 			  that.zhengce = res.data.result
			// 		  }
			// 	  },
			// 	  fail: (err)=>{
			// 		  console.log(err)
			// 	  }
			// })  
		},
		methods: {
			toZhengCe(){
				uni.navigateTo({
					url:'/pages/index/fangzhen/fangzhen'
				})	
			},
			//导航
			tz(id){
				uni.navigateTo({
					url:'/pages/index/fangzhen/zhengce?id='+id
				})
			}
		}
	}
</script>

<style>
	.zc>text{
		font-size: 30upx;
		margin-left: 20upx;
	}
	.zc>.zc_t:last-child{
		margin-bottom: 20upx;
	}
	.zc_t{
		margin-top: 23upx;
	}
	.zc_z{
		width: 120upx;
		height: 120upx;
		border-radius: 10upx;
		overflow: hidden;
		box-shadow:0px 1px 8px #D9D9D9;
		box-shadow:0px 1px 8px #D9D9D9;
		margin-left: 20upx;
		flex-shrink:0;
	}
	.zc_z>image{
		/* height: 120upx; */
	}
	.zc_r{
		height: 120upx;
		margin-left: 23upx;
		margin-right: 20upx;
		overflow: hidden;
	}
	.zc_r>text{
		/* display: block; */
	}
	.zc_r_t{
		font-size: 28upx;
		font-weight: 700;
		margin-top: 6upx;
		/* line-height: 120upx; */
		/* width: 500upx; */
	}
	.zc_r_b{
		font-size:26upx;
		font-weight: 500;
		line-height: 32upx;
		/* margin-top: 14upx; */
		max-height: 60upx;
		overflow: hidden;
		-webkit-line-clamp: 2;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		clear: both;
	}
</style>
